//
//  ShopListTableViewCell.m
//  CYWFrame
//
//  Created by 于顺燊 on 2018/10/16.
//  Copyright © 2018年 Macx. All rights reserved.
//

#import "ShopListTableViewCell.h"
#import <Masonry.h>

@implementation ShopListTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
	self.jumpToShopBtn.layer.cornerRadius = 10.0;
	self.maskView = [[UIView alloc] initWithFrame:self.contentView.frame];
	self.maskView.backgroundColor = kBlackColor;
	self.maskView.alpha = 0.4;
	self.maskView.userInteractionEnabled = NO;
	self.maskView.hidden = YES;
	[self.contentView addSubview:self.maskView];
	[self.maskView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.left.mas_equalTo(self.contentView.mas_left).mas_offset(0);
		make.right.mas_equalTo(self.contentView.mas_right).mas_offset(0);
		make.top.mas_equalTo(self.contentView.mas_top).mas_offset(0);
		make.bottom.mas_equalTo(self.contentView.mas_bottom).offset(0);
	}];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(ShopLocationInfo *)model
{
	if (_model != model) {
		_model = model;
	}
	[self.photo sd_setImageWithURL:[NSURL URLWithString:model.photo]];
	self.shopName.text = model.shop_name;
	self.address.text = model.addr;
	self.phone.text = model.tel;
	self.distance.text = [NSString stringWithFormat:@"距离你：%@", model.distance];
	
}

@end
